<td id="sidebar" style="display:;">
<? if($action == 'category'){?>
	<div>
		<ul>
			<li><a href="?action=category&op=list" <? if($op == 'list' || $op == 'edit'){?>class="current"<? } ?>>分类管理</a></li>
			<li><a href="?action=category&op=add" <? if ($op == 'add'){?>class="current"<? }?>>添加分类</a></li>
		</ul>
	</div>
	
<? }elseif($action == 'content'){?>
	<div>
		<ul>
			<li><a href="?action=content&op=add" <? if ($op == 'add'){?>class="current"<? }?>>发布内容</a></li>
		</ul>
	</div>
	<div>
		<ul>
			<li><strong>文章列表</strong></li>
			<? foreach($cate as $c){?>
			<li>├- <a href="?action=content&op=list&cid=<?=$c['cid']?>" <? if($op == 'list' && $cateid == $c['cid']){?>class="current"<? }?>><?=$c['cname']?></a></li>
			<!--<? if ($c['subcate']){
				foreach($c['subcate'] as $ca){?>
				 <li>&nbsp;&nbsp;├- <a href="?action=content&op=list&cid=<?=$ca['cid']?>" <? if($op == 'list' && $cateid == $ca['cid']){?>class="current"<? }?>><?=$ca['cname']?></a></li>
				<? }?>
			<? }?>
			-->
			<? }?>
		</ul>
	</div>
	
<? }elseif($action == 'comment'){?>
	<div>
		<ul>
			<li><a href="?action=comment&op=list" <? if ($action == 'comment'){?>class="current"<? }?>>文章评论</a></li>
		</ul>
	</div>

<? }elseif($action == 'html'){?>
	<div>
		<ul>
			<li><a href="?action=html&op=index" <? if ($op == 'index'){?>class="current"<? }?>>生成首页</a></li>
			<li><a href="?action=html&op=content" <? if ($op == 'content'){?>class="current"<? }?>>生成内容页</a></li>
			<li><a href="?action=html&op=category" <? if ($op == 'category'){?>class="current"<? }?>>生成列表页</a></li>
		</ul>
	</div>

<? }elseif($action == 'special' || $action == 'block'){?>
	<div>
		<ul>
			<li><a href="?action=special&op=list" <? if ($action=='special' & ($op == 'list' || $op == 'edit')){?>class="current"<? }?>>专题管理</a></li>
			<li><a href="?action=special&op=add" <? if ($action=='special' & $op == 'add'){?>class="current"<? }?>>制作专题</a></li>
		</ul>
	</div>
    <div>
		<ul>
			<li><a href="?action=block&op=list" <? if ($action=='block' & ($op == 'list' || $op == 'edit')){?>class="current"<? }?>>碎片管理</a></li>
			<li><a href="?action=block&op=add" <? if ($action=='block' & $op == 'add'){?>class="current"<? }?>>添加碎片</a></li>
		</ul>
	</div>
	
<? }elseif($action == 'user' || $action == 'admingroup' || $action == 'work' || $action == 'logs' || $action == 'cron'){?>
	<div>
		<ul>
			<li><a href="?action=user&op=list" <? if($action =='user' && $op == 'list' && $op == 'edit'){?>class="current"<? } ?>>用户列表</a></li>
			<li><a href="?action=user&op=add" <? if ($action =='user' && $op == 'add'){?>class="current"<? }?>>添加用户</a></li>
		</ul>
	</div>
    <!--<div>
		<ul>
            <li><a href="?action=admingroup" <? if ($action == 'admingroup'){?>class="current"<? }?>>管理组权限</a></li>
		</ul>
	</div>
	<div>
		<ul>
			<li><a href="?action=work"  <? if ($action == 'work'){?>class="current"<? }?> />工作记录</a></li>
			<li><a href="?action=logs" <? if ($action == 'logs'){?>class="current"<? }?> />操作记录</a></li>
		</ul>
	</div>
	<div>
		<ul>
			<li><a href="?action=cron" <? if ($action == 'cron'){?>class="current"<? }?>>计划任务</a></li>
		</ul>
	</div>
	<div>
		<ul>
			<li><a href="?action=user&op=dboptimize" <? if ($op == 'dboptimize'){?>class="current"<? }?>>数据库优化</a></li>
		</ul>
	</div>
	-->
<? }?>
</td>
<td id="mainarea">